using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using clf.weighing.entity;

namespace weighing
{

    /// <summary>
    /// 数据条数:7
    /// 数据大小:16KB
    /// </summary>


    public class CarInfoVo : BaseVo
    {
        #region Constract
        public CarInfo mCarInfo;
        public CarInfoVo(CarInfo carInfo)
        {
            mCarInfo = carInfo;
        }
        public CarInfoVo() { }
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return false;
            }
            if (obj is CarInfoVo vo)
            {
                return vo.Id == Id;
            }
            return base.Equals(obj);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
        #endregion


        /// <summary>
        /// 可空:NO
        /// </summary>

        public Int64 Id
        {
            get { return mCarInfo.id; }
            set
            {
                mCarInfo.id = value; OnPropertyChanged(this, nameof(Id));
            }
        }

        /// <summary>
        /// 注释:车辆号
        /// 可空:YES
        /// </summary>

        public String CarNumber
        {
            get { return mCarInfo.carNumber; }
            set
            {
                mCarInfo.carNumber = value; OnPropertyChanged(this, nameof(CarNumber));
            }
        }

        /// <summary>
        /// 注释:皮重
        /// 可空:YES
        ///默认值:0.000
        /// </summary>

        public Decimal? TraeWeight
        {
            get { return mCarInfo.traeWeight; }
            set
            {
                mCarInfo.traeWeight = value; OnPropertyChanged(this, nameof(TraeWeight));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String Driver
        {
            get { return mCarInfo.driver; }
            set
            {
                mCarInfo.driver = value;
                OnPropertyChanged(this, nameof(Driver));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String DriverMobile
        {
            get { return mCarInfo.driverMobile; }
            set
            {
                mCarInfo.driverMobile = value;
                OnPropertyChanged(this, nameof(DriverMobile));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String DriverIdnumber
        {
            get { return mCarInfo.driverIdnumber; }
            set
            {
                mCarInfo.driverIdnumber = value;
                OnPropertyChanged(this, nameof(DriverIdnumber));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? OwnerId
        {
            get { return mCarInfo.ownerId; }
            set
            {
                mCarInfo.ownerId = value;
                OnPropertyChanged(this, nameof(OwnerId));
            }
        }

        /// <summary>
        /// 注释:车主名称
        /// 可空:YES
        /// </summary>

        public String OwnerName
        {
            get { return mCarInfo.ownerName; }
            set
            {
                mCarInfo.ownerName = value;
                OnPropertyChanged(this, nameof(OwnerName));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? Addtime
        {
            get { return mCarInfo.addTime; }
            set
            {
                mCarInfo.addTime = value;
                OnPropertyChanged(this, nameof(Addtime));
            }
        }

        /// <summary>
        /// 可空:NO
        ///默认值:0
        /// </summary>

        public Int64 AddUserId
        {
            get { return mCarInfo.addUserId; }
            set
            {
                mCarInfo.addUserId = value;
                OnPropertyChanged(this, nameof(AddUserId));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String AddUserName
        {
            get { return mCarInfo.addUserName; }
            set
            {
                mCarInfo.addUserName = value;
                OnPropertyChanged(this, nameof(AddUserName));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? UpdateTime
        {
            get { return mCarInfo.updateTime; }
            set
            {
                mCarInfo.updateTime = value;
                OnPropertyChanged(this, nameof(UpdateTime));
            }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? UpdateUserId
        {
            get { return mCarInfo.updateUserId; }
            set { mCarInfo.updateUserId = value; OnPropertyChanged(this, nameof(UpdateUserId)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public String UpdateUserName
        {
            get { return mCarInfo.updateUserName; }
            set { mCarInfo.updateUserName = value; OnPropertyChanged(this, nameof(UpdateUserName)); }
        }

        /// <summary>
        /// 注释:行驶证ID
        /// 可空:YES
        /// </summary>

        public String VehicleId { get { return mCarInfo.vehicleId; } set { mCarInfo.vehicleId = value; OnPropertyChanged(this, nameof(VehicleId)); } }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int32? Status
        {
            get { return mCarInfo.status; }
            set { mCarInfo.status = value; OnPropertyChanged(this, nameof(Status)); }
        }

        /// <summary>
        /// 注释:备注
        /// 可空:YES
        /// </summary>

        public String Remark { get { return mCarInfo.remark; } set { mCarInfo.remark = value; OnPropertyChanged(this, nameof(Remark)); } }

        /// <summary>
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? IsDelete
        {
            get { return mCarInfo.isDelete; }
            set { mCarInfo.isDelete = value; OnPropertyChanged(this, nameof(IsDelete)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public DateTime? DeleteTime
        {
            get { return mCarInfo.deleteTime; }
            set { mCarInfo.deleteTime = value; OnPropertyChanged(this, nameof(DeleteTime)); }
        }

        /// <summary>
        /// 可空:YES
        /// </summary>

        public Int64? SyncTime
        {
            get { return mCarInfo.syncTime; }
            set { mCarInfo.syncTime = value; OnPropertyChanged(this, nameof(SyncTime)); }
        }

        /// <summary>
        /// 注释:是否已经有IC卡
        /// 可空:YES
        ///默认值:0
        /// </summary>

        public Int32? HasIc
        {
            get { return mCarInfo.hasIc; }
            set { mCarInfo.hasIc = value; OnPropertyChanged(this, nameof(HasIc)); }
        }

        /// <summary>
        /// 注释:IC 编号
        /// 可空:YES
        /// </summary>

        public String IcNumber
        {
            get { return mCarInfo.icNumber; }
            set { mCarInfo.icNumber = value; OnPropertyChanged(this, nameof(IcNumber)); }
        }

        /// <summary>
        /// 注释:是否为内部车
        /// 默认值:0
        /// </summary>
        public Int32? IsSelf
        {
            get { return mCarInfo.isSelf; }
            set { mCarInfo.isSelf = value; OnPropertyChanged(this, nameof(IsSelf)); }
        }


        #region Text 
        public String IsSelfText
        {
            get { return mCarInfo.isSelf == 1 ?"是":"否"; }          
        }
        #endregion

    }
}
